from celery import Celery

broker = 'redis://192.168.137.10/15'#broker任务队列
backend = 'redis://192.168.137.10/14'#结构存储，执行完的结果存在这里

app = Celery(__name__,broker=broker,backend=backend)

#添加任务,使用这个装饰器进行装饰
@app.task
def add(x,y):
    print(x,y)
    return x+y
